<template>
	<view class="page">
		<view class="flex benben-position-layout flex flex-wrap align-center QuestionBank_flex_0"
			:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
			<view class='flex flex-wrap align-center justify-between flex-sub QuestionBank_fd0_0'>
				<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
					<text class='fu-iconfont2  QuestionBank_fd0_0_c0_c0'>&#xE794;</text>
				</view>
				<text class='QuestionBank_fd0_0_c1'>历年高考真题</text>
				<view class='flex flex-wrap align-center QuestionBank_fd0_0_c2'>
				</view>
			</view>

		</view>
		<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
		<view class="information_view">
			<view class="information_tabs">
				<!-- <u-tabs :list="tabsList" :is-scroll="true" font-size="32" inactive-color="#333333" active-color="#0052B5" bar-width="60" name="fenleimingcheng" :current="current" @change="change"></u-tabs> -->
				<view class="tabs_item" @tap.stop="pickerDiy1658997072074=true">{{kemuleixing_name ? kemuleixing_name : '科目类型'}}</view>
				<view class="tabs_item" @tap.stop="pickerDiy1658997072075=true">{{nianfen_name ? nianfen_name : '试题年份'}}</view>
				<view class="tabs_item" @tap.stop="pickerDiy1658997072076=true">{{shitileixing_name ? shitileixing_name : '试题类型'}}</view>
			</view>
			<view class="loading_css" v-if="isShow">
				<u-loading size="36" color="#1593FF"></u-loading>
				<view>加载中</view>
			</view>
			<view class="information_list" v-else>
				<template v-for="(v, k) in list">
					<view class="list_title">
						<text class="list_title_1"></text>
						<text class="list_title_2">{{v.nianfen}}</text>
					</view>
					<view style="overflow: hidden;">
						<template v-for="(item, index) in v.list">
							<view class="list_item" @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/index/accountingOverview/accountingOverview?section_id=${item.aid}&name=${item.exam_name}&type=2`">
								<view class="item_img">
									<u-lazy-load :image="item.image" height="238" border-radius="8" img-mode="aspectFill"></u-lazy-load>
								</view>
								<view class="item_text">
									{{item.exam_name}}
								</view>
							</view>
						</template>
					</view>
				</template>
				
			</view>
			
			<view class="noData" v-if="list.length == 0 && !isShow">
				<image :src='STATIC_URL+"no.png"'></image>
			</view>
		</view>
		
		<benben-picker ref="benbenWritePickerCodepicker2" :visible.sync="pickerDiy1658997072074" :label.sync='kemuleixing_name'
			:value.sync='kemuleixing_id' :options='kemuleixingList' mode='selector' :mask-show='true' :timeout='true'
			:picker-height='100' default-type='value' :default-props='{"label":"fenleimingcheng","value":"aid"}' @change="change1">
			<template #picker-header>
				<view class='flex flex-wrap align-center justify-between personalInformation_picker2_0'>
					<text class='personalInformation_picker2_0_c0'
						@tap="$refs.benbenWritePickerCodepicker2.cancel()">取消</text>
					<text class='personalInformation_picker2_0_c1'>科目类型</text>
					<text class='personalInformation_picker2_0_c2'
						@tap="$refs.benbenWritePickerCodepicker2.pickerConfirm()">确定</text>
				</view>
			</template>
		</benben-picker>
		
		<benben-picker ref="benbenWritePickerCodepicker3" :visible.sync="pickerDiy1658997072075" :label.sync='nianfen_name'
			:value.sync='nianfen_id' :options='nianfenList' mode='selector' :mask-show='true' :timeout='true'
			:picker-height='100' default-type='value' :default-props='{"label":"nianfen","value":"id"}' @change="change2">
			<template #picker-header>
				<view class='flex flex-wrap align-center justify-between personalInformation_picker2_0'>
					<text class='personalInformation_picker2_0_c0'
						@tap="$refs.benbenWritePickerCodepicker3.cancel()">取消</text>
					<text class='personalInformation_picker2_0_c1'>试题年份</text>
					<text class='personalInformation_picker2_0_c2'
						@tap="$refs.benbenWritePickerCodepicker3.pickerConfirm()">确定</text>
				</view>
			</template>
		</benben-picker>
		
		<benben-picker ref="benbenWritePickerCodepicker4" :visible.sync="pickerDiy1658997072076" :label.sync='shitileixing_name'
			:value.sync='shitileixing_id' :options='shitileixingList' mode='selector' :mask-show='true' :timeout='true'
			:picker-height='100' default-type='value' :default-props='{"label":"leixingmingcheng","value":"aid"}' @change="change3">
			<template #picker-header>
				<view class='flex flex-wrap align-center justify-between personalInformation_picker2_0'>
					<text class='personalInformation_picker2_0_c0'
						@tap="$refs.benbenWritePickerCodepicker4.cancel()">取消</text>
					<text class='personalInformation_picker2_0_c1'>试题类型</text>
					<text class='personalInformation_picker2_0_c2'
						@tap="$refs.benbenWritePickerCodepicker4.pickerConfirm()">确定</text>
				</view>
			</template>
		</benben-picker>
	</view>
</template>
<script>
	import {
		validate
	} from '@/common/utils/validate.js'
	export default {
		components: {},

		data() {
			return {
				tabsList: [],
				current: 0,
				"list": [],
				"page": 1,
				"is_pull": true,
				"last_page": 1,
				"status": 'loadmore',
				"iconType": 'flower',
				"loadText": {
					loadmore: '轻轻上拉',
					loading: '努力加载中',
					nomore: '我也是有底线的'
				},
				"isShow": true,
				pickerDiy1658997072074: false,
				kemuleixingList: [],
				kemuleixing_id: "",  // 科目类型
				kemuleixing_name: "",  // 科目类型
				pickerDiy1658997072075: false,
				nianfenList: [],  // 试题年份
				nianfen_id: "",
				nianfen_name: "",
				pickerDiy1658997072076: false,
				shitileixingList: [],  // 试题类型
				shitileixing_id: "",
				shitileixing_name: "",
			};
		},
		computed: {

		},
		watch: {},
		onLoad(options) {
			this.getTabs1();
			this.getTabs2();
			this.getTabs3();
			this.getList();
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		// 下拉刷新
		onPullDownRefresh() {
			
		},
		// 上拉加载
		onReachBottom() {
			
		},
		onPageScroll(e) {

		},
		methods: {
			getTabs1() {
				this.$api.post(global.apiUrls.post65a7bb970e4a3, {
					
				}).then(res => {
					if (res.data.code == 1) {
						this.kemuleixingList = res.data.data;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			getTabs2() {
				this.$api.post(global.apiUrls.post65a8fd984d16d, {
					
				}).then(res => {
					if (res.data.code == 1) {
						this.nianfenList = res.data.data;
						if (this.nianfenList.length > 0) {
							this.nianfenList.forEach((v, k) => {
								v.id = v.nianfen;
							})
						}
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			getTabs3() {
				this.$api.post(global.apiUrls.post65a8fdaf02a97, {
					
				}).then(res => {
					if (res.data.code == 1) {
						this.shitileixingList = res.data.data;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
			change1(e) {
				this.kemuleixing_id = e.obj.aid;
				this.kemuleixing_name = e.obj.fenleimingcheng;
				this.isShow = true;
				this.getList();
			},
			change2(e) {
				this.nianfen_id = e.value;
				this.nianfen_name = e.result;
				this.isShow = true;
				this.getList();
			},
			change3(e) {
				this.shitileixing_id = e.obj.aid;
				this.shitileixing_name = e.obj.leixingmingcheng;
				this.isShow = true;
				this.getList();
			},
			getList() {
				this.$api.post(global.apiUrls.post6343d6f2ef20b, {
					fenlei_id: this.kemuleixing_id,
					freeshitileixing_id: this.shitileixing_id,
					nianfen: this.nianfen_id
				}).then(res => {
					console.log(res);
					this.isShow = false;
					if (res.data.code == 1) {
						this.list = res.data.data;
					} else {
						this.$message.info(res.data.msg);
					}
				})
			},
		}
	};
</script>
<style lang="scss" scoped>
	.information_view {
		// padding: 0 32rpx;
		.information_tabs {
			height: 80rpx;
			width: 100%;
			position: fixed;
			z-index: 10;
			display: flex;
			align-items: center;
			background-color: #fff;
			.tabs_item {
				width: 33.3%;
				text-align: center;
				padding: 0 16rpx;
				font-size: 32rpx;
				font-weight: bold;
				color: #0052B5;
				display: -webkit-box;    //谷歌
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 1;  //显示几行
				overflow: hidden;
			}
		}
		.list_title {
			display: flex;
			align-items: center;
			margin-bottom: 24rpx;
			.list_title_1 {
				display: inline-block;
				width: 6rpx;
				height: 25rpx;
				background: #1593FF;
				border-radius: 3rpx;
				margin-right: 16rpx;
			}
			.list_title_2 {
				font-size: 32rpx;
				font-weight: bold;
			}
		}
	
		.information_list {
			padding: 104rpx 32rpx 24rpx;
			overflow: hidden;
			.list_item {
				float: left;
				width: 217rpx;
				height: 313rpx;
				padding: 10rpx 10rpx 16rpx 10rpx;
				margin: 0 16rpx 24rpx 0;
				background: #ffffff;
				border-radius: 8rpx;
				.item_img {
					width: 100%;
					height: 238rpx;
					margin-bottom: 16rpx;
					/deep/.u-lazy-item {
						width: 100%;
						height: 238rpx;
					}
				}
				.item_text {
					font-size: 24rpx;
					font-weight: 500;
					overflow: hidden;
					text-overflow: ellipsis;
					/* 弹性伸缩盒子模型显示 */
					display: -webkit-box;
					-webkit-line-clamp: 4;
					-webkit-box-orient: vertical;
				}
			}
			.list_item:nth-child(3n+3) {
				margin: 0 0 24rpx 0;
			}
		}
	}
	
	.personalInformation_picker2_0 {
		border-bottom: 1px solid #eee;
		background: #fff;
		background-size: 100% !important;
		padding: 0rpx 32rpx 0rpx 32rpx;
		border-radius: 16rpx 16rpx 0rpx 0rpx;
		background-size: 100% auto !important;
		height: 100rpx;
	}
	
	.personalInformation_picker2_0_c0 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 400;
		color: #BFBFBF;
	}
	
	.personalInformation_picker2_0_c1 {
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}
	
	.personalInformation_picker2_0_c2 {
		color: rgba(44, 143, 255, 1);
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 400;
	}
	
	
	.QuestionBank_fd1_0 {
		background: #fff;
		background-size: 100% !important;
		height: 140rpx;
		padding: 0rpx 32rpx 0rpx 32rpx;
		margin: 0rpx 0rpx 24rpx 0rpx;
		background-size: 100% auto !important;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}

	.QuestionBank_fd1_0_c0 {
		width: 88rpx;
		height: 88rpx;
		margin: 0rpx 24rpx 0rpx 0rpx;
		border-radius: 44rpx 44rpx 44rpx 44rpx;
	}

	.QuestionBank_fd1_0_c1 {
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		line-height: 45rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #333333;
	}

	.QuestionBank_fd1_0_c2 {
		font-size: 26rpx;
		font-weight: 500;
		color: #333;
	}

	.QuestionBank_flex_1 {
		margin: 32rpx 32rpx 0rpx 32rpx;
	}

	.QuestionBank_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		height: 88rpx;
	}

	.QuestionBank_fd0_0_c0_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #fff;
		line-height: 36rpx;
	}

	.QuestionBank_fd0_0_c1 {
		font-size: 36rpx;
		font-weight: 500;
		color: #ffffff;
		line-height: 50rpx;
	}

	.QuestionBank_fd0_0_c2 {
		width: 36rpx;
		height: 36rpx;
	}

	.QuestionBank_flex_0 {
		background: url(https://app.ezsdcsm.com/images/91.png) no-repeat;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% 100% !important;
	}

	.page {
		min-height: calc(100vh - var(--window-bottom));
		background: #f8f8f8;
		background-size: 100% auto !important;
	}
</style>
